function []=analysis_staircase(EXPE)
% Analyse de l'escalier
clf
hold on
COLORS = { 'b' 'm' } ;
for i=1:2
    acc = [EXPE.staircase{i}.trial.acc];
    stim = [EXPE.staircase{i}.trial.stim];
    x= [stim.x];
    h(i,1)=plot(x,'color',COLORS{i});
    I= 41:60;
    txt =sprintf('%g%%',100*mean(acc(I)));
    text(61,x(end),txt);
    h(i,2)=plot(I, x(I),'LineWidth',3, 'color',COLORS{i});
end
legend(h(1:2,1), [EXPE.TASKS(1) EXPE.TASKS(2) ] )
hold off

title({ 'STAIRCASE', ...
sprintf('%s (%s)',EXPE.ParticipantName,datestr(EXPE.Date))}) 